package com.wwh.tx.homework.dao;

import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;

/**
 * @author Albert
 * @date 2024/8/29-15:32
 * @describe
 */
@Repository
public class SellerDAO {
    @Resource
    private JdbcTemplate jdbcTemplate;

    public void updateMoney(int id, double money){
        String sql = "UPDATE seller SET money = money + ? WHERE id = ?";
        jdbcTemplate.update(sql, money, id);
    }
}
